package com.all.utils;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;

public class DialogUtils {

	public static AlertDialog mAlertDialog=null;
	
	public static void showIntentDialog(final Context mContext,String title,final Intent intent)
	{
		mAlertDialog=new AlertDialog.Builder(mContext)
    	.setTitle(title)
    	.setNegativeButton("确定", new DialogInterface.OnClickListener() {			
			@Override
			public void onClick(DialogInterface dialog, int which) {
				mContext.startActivity(intent);
			}
		})
		.setPositiveButton("取消", new DialogInterface.OnClickListener() {
			@Override
			public void onClick(DialogInterface dialog, int which) {
					mAlertDialog.dismiss();
			}
		}).create();
    	mAlertDialog.show();
	}
	
	public static void showInputDialog(final Context mContext,String title)
	{
		mAlertDialog=new AlertDialog.Builder(mContext)
    	.setTitle(title)
    	.setNegativeButton("确定", new DialogInterface.OnClickListener() {			
			@Override
			public void onClick(DialogInterface dialog, int which) {	
			}
		}).create();
    	mAlertDialog.show();
	}
}
